<html>
	<head>
	</head>

	<body>
		<div>123</div>
		<script>
			// 设置ID名称
			// el.id = "值"
		
			var div = document.querySelector("div")
			div.id = "myID"
			console.log(div.id)
			var a = document.querySelector("#myID")
			console.log(a)
		</script>
	</body>
</html>